package com.maddox.mworld.entity;

import androidx.room.Entity;
import androidx.room.PrimaryKey;

import java.util.Objects;


/**
 * the photo entity class
 */
@Entity
public class Picture {

    @PrimaryKey
    private int id;
    private String pageURL;
    private String type;
    private String tags;
    private String previewURL;
    private String previewWidth;
    private String previewHeight;
    private String webformatURL;
    private String webformatWidth;
    private String webformatHeight;
    private String largeImageURL;
    private String imageHeight;
    private String imageSize;
    private String views;
    private String downloads;
    private String favorites;
    private String likes;
    private String comments;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPageURL() {
        return pageURL;
    }

    public void setPageURL(String pageURL) {
        this.pageURL = pageURL;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getPreviewURL() {
        return previewURL;
    }

    public void setPreviewURL(String previewURL) {
        this.previewURL = previewURL;
    }

    public String getPreviewWidth() {
        return previewWidth;
    }

    public void setPreviewWidth(String previewWidth) {
        this.previewWidth = previewWidth;
    }

    public String getPreviewHeight() {
        return previewHeight;
    }

    public void setPreviewHeight(String previewHeight) {
        this.previewHeight = previewHeight;
    }

    public String getWebformatURL() {
        return webformatURL;
    }

    public void setWebformatURL(String webformatURL) {
        this.webformatURL = webformatURL;
    }

    public String getWebformatWidth() {
        return webformatWidth;
    }

    public void setWebformatWidth(String webformatWidth) {
        this.webformatWidth = webformatWidth;
    }

    public String getWebformatHeight() {
        return webformatHeight;
    }

    public void setWebformatHeight(String webformatHeight) {
        this.webformatHeight = webformatHeight;
    }

    public String getLargeImageURL() {
        return largeImageURL;
    }

    public void setLargeImageURL(String largeImageURL) {
        this.largeImageURL = largeImageURL;
    }

    public String getImageHeight() {
        return imageHeight;
    }

    public void setImageHeight(String imageHeight) {
        this.imageHeight = imageHeight;
    }

    public String getImageSize() {
        return imageSize;
    }

    public void setImageSize(String imageSize) {
        this.imageSize = imageSize;
    }

    public String getViews() {
        return views;
    }

    public void setViews(String views) {
        this.views = views;
    }

    public String getDownloads() {
        return downloads;
    }

    public void setDownloads(String downloads) {
        this.downloads = downloads;
    }

    public String getFavorites() {
        return favorites;
    }

    public void setFavorites(String favorites) {
        this.favorites = favorites;
    }

    public String getLikes() {
        return likes;
    }

    public void setLikes(String likes) {
        this.likes = likes;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Picture picture = (Picture) o;
        return id == picture.id &&
                Objects.equals(pageURL, picture.pageURL) &&
                Objects.equals(type, picture.type) &&
                Objects.equals(tags, picture.tags) &&
                Objects.equals(previewURL, picture.previewURL) &&
                Objects.equals(previewWidth, picture.previewWidth) &&
                Objects.equals(previewHeight, picture.previewHeight) &&
                Objects.equals(webformatURL, picture.webformatURL) &&
                Objects.equals(webformatWidth, picture.webformatWidth) &&
                Objects.equals(webformatHeight, picture.webformatHeight) &&
                Objects.equals(largeImageURL, picture.largeImageURL) &&
                Objects.equals(imageHeight, picture.imageHeight) &&
                Objects.equals(imageSize, picture.imageSize) &&
                Objects.equals(views, picture.views) &&
                Objects.equals(downloads, picture.downloads) &&
                Objects.equals(favorites, picture.favorites) &&
                Objects.equals(likes, picture.likes) &&
                Objects.equals(comments, picture.comments);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, pageURL, type, tags, previewURL, previewWidth, previewHeight, webformatURL, webformatWidth, webformatHeight, largeImageURL, imageHeight, imageSize, views, downloads, favorites, likes, comments);
    }

    @Override
    public String toString() {
        return "Picture{" +
                "id=" + id +
                ", pageURL='" + pageURL + '\'' +
                ", type='" + type + '\'' +
                ", tags='" + tags + '\'' +
                ", previewURL='" + previewURL + '\'' +
                ", previewWidth='" + previewWidth + '\'' +
                ", previewHeight='" + previewHeight + '\'' +
                ", webformatURL='" + webformatURL + '\'' +
                ", webformatWidth='" + webformatWidth + '\'' +
                ", webformatHeight='" + webformatHeight + '\'' +
                ", largeImageURL='" + largeImageURL + '\'' +
                ", imageHeight='" + imageHeight + '\'' +
                ", imageSize='" + imageSize + '\'' +
                ", views='" + views + '\'' +
                ", downloads='" + downloads + '\'' +
                ", favorites='" + favorites + '\'' +
                ", likes='" + likes + '\'' +
                ", comments='" + comments + '\'' +
                '}';
    }
}
